#ifndef QSERVERDATASYNC_H
#define QSERVERDATASYNC_H

#include "../devicelibglobal.h"
#include "../qbasedefine.h"

#include <QObject>
#include <QVariant>

struct tagDataInfo
{
    QString     m_uuid;
    QString     m_group;
    QString     m_name;
    QString     m_type;
    QString     m_information;
    QVariant    m_value;
    bool        m_lock;
};


class DEVICELIB_EXPORT QServerDataSync : public QObject
{
    Q_OBJECT
public:
    explicit QServerDataSync(QObject *parent = 0);
    ~QServerDataSync();

    void    add_data(tagDataInfo* data);

    void    clear();

    void    set_data_value(const QString &uuid,const QString &value);
    QList<tagDataInfo*> get_datas();
    tagDataInfo *get_data(const QString &uuid);
signals:
    
public slots:
protected:
    tagDeviceInfo   m_device_info;
    QList<tagDataInfo*>     m_datas;
    QMap<QString,tagDataInfo*>  m_uuid_to_data;
};

#endif // QSERVERDATASYNC_H
